﻿@{
    ViewBag.Title = "Tipo de Muestra";
    ViewBag.slide = "false";
    ViewBag.user = "private";
    ViewBag.perfil = Session["Codigodeperfil"];
    var zebra1 = 0;
}
@section menuLateral{
    <p>
        <br />
        <br />
    </p>
    <ul>
        <li>@Html.ActionLink("Proyecto", "Index", "Proyecto")</li>
        <li>@Html.ActionLink("Tipos de Muestra", "Index", "TipodeMuestra")</li>
        <li>@Html.ActionLink("Tipos de Lugar", "Index", "TipodeLugar")</li>
        <li>@Html.ActionLink("Lugar", "Index", "Lugar")</li>
        <li>@Html.ActionLink("Unidades de Medida", "Index", "UnidaddeMedida")</li>
        <li>@Html.ActionLink("Variable", "Index", "Variable")</li>
        <li>@Html.ActionLink("Rango de Cualidad", "Index", "RangodeCualidad")</li>
        <li>@Html.ActionLink("Equipo de Medicion", "Index", "EquipodeMedicion")</li>
        <li>@Html.ActionLink("Detalle de Equipo", "Index", "DetalledeEquipo")</li>
        <li>@Html.ActionLink("Muestra", "Index", "Muestra")</li>
    </ul>
}
@section equipoMedicion {
    <p>
        <br />
    </p>
    <fieldset>
        <br />
        <p>
            @Html.ActionLink("Crear Nuevo", "Crear", "TipodeMuestra")
        </p>
        <div id="result">
            @if (ViewData.Model.GetType() == typeof(string))
            {
                <p>@ViewData.Model</p>
            }
            else
            {
                <table id="tabla" class="tablesorter">
                    <thead>
                        <tr>
                            <th colspan="5">
                                <div align="center">
                                    <strong>::TIPOS DE MUESTRAS EXISTENTES::</strong></div>
                            </th>
                        </tr>
                        <tr>
                            <td>
                                <div align="center">
                                    Identificador</div>
                            </td>
                            <td>
                                <div align="center">
                                    Nombre</div>
                            </td>
                            <td>
                                <div align="center">
                                    Editar</div>
                            </td>
                            <td>
                                <div align="center">
                                    Eliminar</div>
                            </td>
                             <td>
                                <div align="center">
                                    Fotografia</div>
                            </td>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var m in ViewData.Model)
                        {

                            if (zebra1 == 0)
                            {
                            <tr class="colortr1">
                                <td>
                                    @m.Identificador
                                </td>
                                <td>
                                    @m.Nombre
                                </td>
                                <td>
                                    <a href="@Url.Action("Editar", "TipodeMuestra", new { id = @m.Identificador }, null)">
                                        <img class="edit" src="@Url.Content("~/Content/img/action/edit.png")"/></a>
                                </td>
                                <td>
                                    <a href="@Url.Action("Eliminar", "TipodeMuestra", new { Identificador = @m.Identificador }, null)">
                                        <img class="delete" src="@Url.Content("~/Content/img/action/delete.png")"/></a>
                                </td>
                                 <td>
                                    <a href="@Url.Action("FormFileupload", "TipodeMuestra", new { Identificador = @m.Identificador }, null)">
                                        <img class="delete" src="@Url.Content("~/Content/img/action/add.png")" alt="Gestionar Fotografia"
                                        title="Gestionar Fotografia"/></a>
                                </td>
                            </tr>
                                                            zebra1 = 1;
                            }
                            else
                            {
                            
                            <tr class="colortr2">
                                <td>
                                    @m.Identificador
                                </td>
                                <td>
                                    @m.Nombre
                                </td>
                                <td>
                                    <a href="@Url.Action("Editar", "TipodeMuestra", new { id = @m.Identificador }, null)">
                                        <img class="edit" src="@Url.Content("~/Content/img/action/edit.png")"/></a>
                                </td>
                                <td>
                                    <a href="@Url.Action("Eliminar", "TipodeMuestra", new { Identificador = @m.Identificador }, null)">
                                        <img class="delete" src="@Url.Content("~/Content/img/action/delete.png")"/></a>
                                </td>
                                 <td>
                                    <a href="@Url.Action("FormFileupload", "TipodeMuestra", new { Identificador = @m.Identificador }, null)">
                                        <img class="delete" src="@Url.Content("~/Content/img/action/add.png")" alt="Gestionar Fotografia"
                                        title="Gestionar Fotografia"/></a>
                                </td>
                            </tr>
                                                            zebra1 = 0;

                            }
                        }
                    </tbody>
                </table>
                <div id="pager" align="center">
                    <form>
                    <img src="@Url.Content("~/Content/img/table/first.png")" class="first" />
                    <img src="@Url.Content("~/Content/img/table/prev.png")" class="prev" />
                    <input type="text" class="pagedisplay" />
                    <img src="@Url.Content("~/Content/img/table/next.png")" class="next" />
                    <img src="@Url.Content("~/Content/img/table/last.png")" class="last" />
                    <select class="pagesize">
                        <option selected="selected" value="5">5</option>
                        <option value="10">10</option>
                        <option value="15">15</option>
                        <option value="20">20</option>
                    </select>
                    </form>
                </div>
            }
        </div>
        <br />
        <div align="center">
            @Html.ValidationMessage("Identificador")
        </div>
        <br />
        <div align="center">
            @Html.ValidationSummary(true, " Verifique su Dependencia.")
        </div>
    </fieldset>
}
